<template>
  <div id="app">
    家庭财产{{ money }}
    <!-- <Model :sync="sync" title="老子是标题" :btnList="btnList" @closeFun="sync = false">
      <h1>123123</h1>
      <h1>123123</h1>
      <h1>123123</h1>
      <h1>123123</h1>
    </Model>
    <button @click="sync = true">开</button>-->
    <ChildOne></ChildOne>
    <ChildTwo v-if="sync"></ChildTwo>
    <button @click="sync = !sync">开</button>
  </div>
</template>

<script>
import Model from './components/model'
import ChildOne from './components/ChildOne'
import ChildTwo from './components/ChildTwo'
export default {
  computed: {
    money() {
      return this.$store.state.money
    }
  },
  components: {
    Model,
    ChildOne,
    ChildTwo
  },
  data() {
    return {
      sync: false,
      btnList: [
        {
          name: "确定",
          click: () => {
            console.log("确定")
          }
        }, {
          name: "取消",
          click: () => {
            console.log("取消")
            this.sync = false
          }
        }
      ]
    }
  }
}
</script>

<style>
</style>